home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / windownt / wpj1_8.zip / GASH.ZIP / TEST / TEST.C next >
C/C++ Source or Header  |  1993-08-11  |  1KB  |  46 lines

  1.  
  2. #define STRICT
  3. #include <windows.h>
  4. #include <windowsx.h>
  5. #include <stdio.h>
  6. #include "dll/dll.h"
  7.  
  8.  
  9. static char string[256];
  10.  
  11. #pragma argsused
  12. int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE hPrev,
  13.                     LPSTR lpCmdLine, int nCmdShow)
  14.   {HMODULE hModule, hModuleDLL;
  15.    HTASK hTask, hTaskDLL;
  16.    HINSTANCE hInstanceDLL;
  17.  
  18.    hModule = GetInstanceModule (hInstance);
  19.    hTask = GetCurrentTask ();
  20.    hModuleDLL = GetDLLModule ();
  21.    hTaskDLL = GetDLLTask ();
  22.    hInstanceDLL = GetDLLInstance ();
  23.  
  24.    sprintf (string, "Application values:\n"
  25.                     "   hInstance: %04X\n"
  26.                     "   hModule: %04X\n"
  27.                     "   hTask: %04X\n"
  28.                     "DLL values:\n"
  29.                     "   hInstance: %04X\n"
  30.                     "   hModule: %04X\n"
  31.                     "   hTask: %04X",
  32.             hInstance,
  33.             hModule,
  34.             hTask,
  35.             hInstanceDLL,
  36.             hModuleDLL,
  37.             hTaskDLL);
  38.  
  39.    MessageBox (NULL, string, "Test hInstance, hModule and hTask",
  40.       MB_OK | MB_ICONINFORMATION | MB_TASKMODAL);
  41.  
  42.    return 0;
  43.   } // end WinMain
  44.  
  45.  
  46.